package wox.lonice.btctrade.common;

import wox.lonice.btctrade.dto.LinkeEntityDto;

import java.math.BigDecimal;
import java.util.Hashtable;
import java.util.Map;
import java.util.concurrent.LinkedBlockingDeque;

/**
 * <p>描述：常量</p>
 *
 * @author LoNice
 * @Date 2018/5/27 14:02
 */
public interface BaseConstant {

    public final static String MAIL_USER = "wox666@sina.com";
    public final static String MAIL_PW = "wox666@sina.com";
    public final static String MAIL_SMTP_HOST = "smtp.sina.com";

    /**
     * 生产 <-----> 消耗
     * takeFirst()和takeLast()：分别返回类表中第一个和最后一个元素，返回的元素会从类表中移除。如果列表为空，调用的方法的线程将会被阻塞直达列表中有可用元素。
     * getFirst()和getLast():分别返回类表中第一个和最后一个元素，返回的元素不会从列表中移除。如果列表为空，则抛出NoSuckElementException异常。
     * peek()、peekFirst()和peekLast():分别返回列表中第一个元素和最后一个元素，返回元素不会被移除。如果列表为空返回null.
     * poll()、pollFirst()和pollLast():分别返回类表中第一个和最后一个元素，返回的元素会从列表中移除。如果列表为空，返回Null。
     */
    public final static LinkedBlockingDeque<LinkeEntityDto> LINKED_BLOCKING_DEQUE = new LinkedBlockingDeque<>(20000);
    //用于存储发过邮件的map集合
    public final static Map<String, Long> mailMap = new Hashtable<>();
    // 线程池线程初始化数量
    public final static int threadPoolNum = 5;






    // 比特币交易区
    public final static String BTC = "btc";
    // 以太坊交易区
    public final static String ETH = "eth";
    // usc交易区
    public final static String USC = "usc";
    // usdt交易区
    public final static String USDT = "usdt";
    //btctrade 交易私钥
    public final static String BTCTRADE_PRIVATE_KEY = "OHJb{-CAw4u-KTj9u-VjZH^-/zGQj-GmaAF-D522f";
    //btctrade 交易公钥
    public final static String BTCTRADE_PUBLIC_KEY = "3wmfq-a7icw-ahkx6-mwjpg-4eup3-wktu1-mwx8c";
    //coinegg 交易私钥
    public final static String COINEGG_PRIVATE_KEY = "YxVJ3-j)FK{-~@Y{t-1F/67-{d.&A-tS[$P-mW2$n";
    //coinegg 交易公钥
    public final static String COINEGG_PUBLIC_KEY = "24764-f8tni-egbxg-avwh9-mh3k2-3r2ai-scmyh";
    //btctrade api接口地址
    public final static String BTCTRADE_DOMAIN = "https://www.btctrade.tv";
    //coinegg api接口地址
    public final static String COINEGG_DOMAIN = "https://api.coinegg.im";
    //买入手续费
    public final static BigDecimal BTCTRADE_SERVICE_CHARGE = new BigDecimal("0.001");
    //币种价格api   https://www.btctrade.tv/api/v1/ticker/region/btc?coin=lxt
    public final static String TICKER = "/api/v1/ticker/region/";
    //币种市场深度api(五档)
    public final static String DEPTH = "/api/v1/depth/region/";
    //账户信息api
    public final static String ACCOUNT_BALANCE = "/api/v1/balance/";
    //挂单查询api
    public final static String TRUST_LIST = "/api/v1/trust_list/region/";
    //订单查询api
    public final static String TRUST_VIEW = "/api/v1/trust_view/region/";
    //取消订单api
    public final static String TRUST_CANCEL = "/api/v1/trust_cancel/region/";
    //下单api
    public final static String TRUST_ADD = "/api/v1/trust_add/region/";
    //涨值幅度
    public final static BigDecimal RISE_PERCENT = new BigDecimal("9.0");
    public final static BigDecimal FALL_PERCENT = new BigDecimal("-9.0");
    //十档+涨跌幅%
    //https://www.btctrade.tv/coin/btc/xrp/order

}
